<?php session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
	<meta charset="utf-8">
    <title>Driver/Vendor Page</title>
<?php echo link_tag(my_url().'skin.css'); ?>
<script type="text/javascript" src="<?php echo my_url(); ?>js/1.js"></script>
<script type="text/javascript" src="../js/1.js"></script>
<script src="<?php echo my_url(); ?>js/AC_RunActiveContent.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
 var BaseURL='<?php echo base_url(); ?>';


function confirmDelete(dv_company_namede){
	
	var x= window.confirm("Are you sure to delete this item?");
	if(x){
		window.location.href = BaseURL + "dv_payments/delete_dv_payments/" + dv_company_namede;
	}	
}



</script>

<link rel="stylesheet" href="../skin.css" type="text/css" media="screen" /><meta name="author" content="Jaypee Mahilum" />
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
<link href="skin.css" rel="stylesheet" type="text/css" />
</head>

<?php
//echo $_SESSION['administrator_log']."============";
if(!isset($_SESSION['administrator_log']))
{
		echo"Log in first to access this page<html><title>WARNING</title><body><br><a href='".base_url()."administrator' />click here to log in.</a></body></html>";
}
else
{
?>
<body >

	<div class="BodyCover">
	
 		<div class="ParentContent">
	        <?php require("owner_menu.php"); ?>
			<div class="MenuTab">
    			<div class="MenuBelow"><img src="<?php echo my_url();?>images/below-menu.gif"></div>        
             </div>
            <div class="title">
               <h1>Vendor Payment List</h1>
            </div>                        
			<div class="module-index1">
            
		  		<div align="right"><a href="<?php echo base_url()?>admin/logout" style="color:#FF0000;">logout</a></div><br/>
  	                <p class=""><?php if (isset($recordflag)) {echo $recordflag;}?><p>  <form action="<?php echo base_url(); ?>dv_payments/SearchLoadNo" method="post">				<fieldset>					<label><b>Search by Load No.:</b></label>					<input type="text" name="search" id="search" value="" size="10" />					<input type="submit" value="Search" id="Search" />				</fieldset>		    </form>          <br />		
                <div style='overflow:scroll;width:940px;height:400px;border:1pt solid #000;'>
                <table class='Grid' width='940px' border='1'>
                  <tr>
                        <th >View</th>
                        <th >Edit</th>
                 	    <th nowrap="nowrap">Load No.</th>
                        <th nowrap="nowrap">Driver Company </th>
                   		<th nowrap="nowrap">Contract Amount</th>
						
                        <th nowrap="nowrap">Advance1</th>                        
                        <th nowrap="nowrap">Type</th>
                        <th nowrap="nowrap">Date</th>
                        <th nowrap="nowrap">Reference </th>                        
                        <th nowrap="nowrap">Reference Name</th> 
                        <th nowrap="nowrap">Ad1_Balance</th> 
						
                        <th nowrap="nowrap">Advance2</th>                        
                        <th nowrap="nowrap">Type</th>
                        <th nowrap="nowrap">Date</th>
                        <th nowrap="nowrap">Reference </th>                        
                        <th nowrap="nowrap">Reference Name</th>                          
						<th nowrap="nowrap">Ad2_Balance</th> 
                                                
                        <th nowrap="nowrap">Detention Amount</th>                        
                        <th nowrap="nowrap">Description Time</th>
                        <th nowrap="nowrap">Lumpar</th>
                        <th nowrap="nowrap">Amount </th>                        
                        <th nowrap="nowrap">Description</th>                          
                        <th nowrap="nowrap">Balance</th>
                        
                        <th nowrap="nowrap">Amount</th>
                        <th nowrap="nowrap">Type</th>
                        <th nowrap="nowrap">Date </th>                        
                        <th nowrap="nowrap">Reference</th>                          
                        <th nowrap="nowrap">Final Balance</th>                                                                                                                        
                 </tr>
<?php
        		  $_rowClass = 'tr_odd';
                foreach($list_dv_paymentss as $row)
                {
                         $load_no = $row->load_no;
                         $dv_company_name = $row->dv_company_name;						 
						 $contract_amount = $row->contract_amount;						 
						 $advance1 = $row->advance1;						 
					 	 $type1 = $row->type1;
					 	 $date1 = $row->date1;						 
						 $reference1 = $row->reference1;
 						 $ref_name1 = $row->ref_name1;
						 $balance_ad1 = $row->balance_ad1;						 
						 $advance2 = $row->advance2;						 
					 	 $type2 = $row->type2;
					 	 $date2 = $row->date2;						 
						 $reference2 = $row->reference2;
						 $ref_name2 = $row->ref_name2;
 						 $balance_ad2 = $row->balance_ad2;
						 $detention_amnt = $row->detention_amnt;
						 $description_time = $row->description_time;						 
					 	 $lumpar = $row->lumpar;
					 	 $l_amount = $row->l_amount;						 
						 $description = $row->description;
 						 $dl_balance = $row->dl_balance;
						 $f_amount = $row->f_amount;						 
					 	 $f_type = $row->f_type;
					 	 $f_date = $row->f_date;						 
						 $f_reference = $row->f_reference;
 						 $f_balance = $row->f_balance;
?>					
					<tr class="<?php echo $_rowClass ?>"  <?php echo GetTrEffects() ?> >
                        <td width='5'>
                                <a href="<?php echo base_url() . "dv_payments/view_dv_payments/". $row->dv_payment_id ?>" >
                                <img src="<?php echo my_url() . "images/icons/view.gif" ?>" style='border:none'/></a>
						</td>
                        <td width='5'>
                        	<a href="<?php echo base_url() . "dv_payments/edit_dv_payments/" . $row->dv_payment_id ?>">
                            	<img src="<?php echo my_url() . "images/icons/edit.gif" ?>" style='border:none' />
                             </a>
						</td>
                 		<td nowrap="nowrap"><?php echo $load_no ?></td>
                        <td nowrap="nowrap"><?php echo $dv_company_name?></td>
						<td nowrap="nowrap"><?php echo $contract_amount?></td>                        
                        
                        <td nowrap="nowrap"><?php echo $advance1?></td>
                        <td nowrap="nowrap"><?php echo $type1?></td>
 						<td nowrap="nowrap"><?php echo $date1?></td>
						<td nowrap="nowrap"><?php echo $reference1?></td>                        
						<td nowrap="nowrap"><?php echo $ref_name1?></td>                                                
						<td nowrap="nowrap"><?php echo $balance_ad1?></td>                                                
                        
						<td nowrap="nowrap"><?php echo $advance2?></td>
                        <td nowrap="nowrap"><?php echo $type2?></td>
 						<td nowrap="nowrap"><?php echo $date2?></td>
						<td nowrap="nowrap"><?php echo $reference2?></td>                        
						<td nowrap="nowrap"><?php echo $ref_name2?></td>                                                
						<td nowrap="nowrap"><?php echo $balance_ad2?></td>   
                                                                     
						<td nowrap="nowrap"><?php echo $detention_amnt?></td>
                        <td nowrap="nowrap"><?php echo $description_time?></td>
 						<td nowrap="nowrap"><?php echo $lumpar?></td>
						<td nowrap="nowrap"><?php echo $l_amount?></td>                        
						<td nowrap="nowrap"><?php echo $description?></td>                                                
						<td nowrap="nowrap"><?php echo $dl_balance?></td>                        
                        
    					<td nowrap="nowrap"><?php echo $f_amount?></td>                                                                        
    					<td nowrap="nowrap"><?php echo $f_type?></td>                                                                        
    					<td nowrap="nowrap"><?php echo $f_date?></td>                                                                                                                        
                        <td nowrap="nowrap"><?php echo $f_reference?></td>                                                                                                                        
  						<td nowrap="nowrap"><?php echo $f_balance?></td>
                  </tr>
<?php                  
				  if($_rowClass=="tr_odd") $_rowClass="tr_even"; else $_rowClass="tr_odd";     
                 }
?>
                 </table></div> 
       
    		<br>

            <div class="BodyContent">
            </div>	
			    		
		    <div class="Footer1">	
                <div class="Footer">Copyright &copy; 2011. All Rights Reserved <br><br>
                 <a href="http://webmartis.com"> <img src="<?php echo my_url();?>images/wmlink.png"></a>
                 
                </div>                
            </div> <!---end of Footer1 ---->        
            
		</div><!---end of ParentContent ---->
    </div> <!---end of BodyCover ---->
 
</body>
<?php } ?>
</html>

